﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Globalization;
public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        loadHolder();
    }

    /// <summary>
    /// Load usercontrol
    /// Author: ThuanNH
    /// Create: 25/07/2013
    /// </summary>
    private void loadHolder()
    {
        string strUserControlName = clsCommon.fncGetRoute(this.Page, "UserControl");
        //Check usercontrol = kieu phong tro
        if (clsKieuPhongTro.fncCheckExists_KieuPT(strUserControlName) || strUserControlName == basConst.KP_TAT_CA) strUserControlName = "phong-tro";
        clsCommon.fncLoadUserControl(plhContent, this.Page, "UserControl/", strUserControlName, "index");
    }

    /// <summary>
    /// Lấy danh sách khu vực theo parent ID
    /// </summary>
    /// <param name="strParentID"></param>
    /// <returns></returns>
    [WebMethod]
    public static string fncGetDropKhuVuc_By_ParentID(string strParentID, int iType)
    {
        return clsExportHtml.fncExportKhuVuc_DropDownList(clsKhuVuc.fncGetKhuVucBy_ParentID(strParentID), iType);
    }
    /// <summary>
    /// Service lấy danh sách phong tro
    /// </summary>
    /// <param name="iPageIndex"></param>
    /// <param name="iPageSize"></param>
    /// <param name="strCateName"></param>
    /// <param name="iHSX"></param>
    /// <param name="iMH"></param>
    /// <param name="iHDH"></param>
    /// <returns></returns>
    [WebMethod]
    public static string fncLoadMorePhongTro(int iPageIndex, int iPageSize, string strKhuVuc, int iGia, int iDienTich, string strKieuPT, string strUS_ID)
    {
        DataSet dts = clsPhongTro.PhongTro_FND(iPageIndex, iPageSize, strKhuVuc, iGia, iDienTich, "", strKieuPT, strUS_ID, 2);
        return clsExportHtml.fncExportPhongTro(dts.Tables[0]);
    }
}